package com.example.demo.service.impl;

import com.example.demo.dao.ClassificationTableDao;
import com.example.demo.dao.WarehouseDao;
import com.example.demo.pojo.ClassificationTable;
import com.example.demo.pojo.Warehouse;
import com.example.demo.service.Position;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Service
public class PositonImpl implements Position {

    @Autowired
    WarehouseDao warehouseDao;


    @Autowired
    ClassificationTableDao classificationTableDao;


    //查找所有库的经纬度；
    @Override
    public List<Warehouse> findAll() {
        return warehouseDao.selectAll();
    }


    //依据所在库查找所有分类
    @Override
    public List<ClassificationTable> allClassfiyByWarehouse(String house) {
        int id=Integer.valueOf(house);
      return   classificationTableDao.Classficationtable(id);
    }
}
